package com.example.a22310.myapplication.Service;

import android.provider.MediaStore;

import com.example.a22310.myapplication.Beans.ActivityOrder;
import com.example.a22310.myapplication.Beans.Attention;
import com.example.a22310.myapplication.Beans.BubbleNumber;
import com.example.a22310.myapplication.Beans.Choiceness;
import com.example.a22310.myapplication.Beans.Club;
import com.example.a22310.myapplication.Beans.ClubCourse;
import com.example.a22310.myapplication.Beans.Coach;
import com.example.a22310.myapplication.Beans.NewBean;
import com.example.a22310.myapplication.Beans.Order;
import com.example.a22310.myapplication.Beans.Post;
import com.example.a22310.myapplication.Beans.PostComment;
import com.example.a22310.myapplication.Beans.PostDetail;
import com.example.a22310.myapplication.Beans.Prize;
import com.example.a22310.myapplication.Beans.Race;
import com.example.a22310.myapplication.Beans.Train;
import com.example.a22310.myapplication.Beans.TrainOrder;
import com.example.a22310.myapplication.Beans.UserInfo;
import com.example.a22310.myapplication.Beans.VideoComment;
import com.example.a22310.myapplication.Beans.user;

import org.w3c.dom.Comment;

import java.util.List;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

public interface service {

    @GET("Login/login/")    //登录
    Call<user> userLogin(
            @Query("user_user") String user_user,
            @Query("user_password") String user_password
    );

    @GET("Register/register/") //注册
    Call<user>register(
            @Query("user_user") String user_user,
            @Query("user_username") String user_username,
            @Query("user_password") String user_password
    );

    @GET("UserInformation/userpic/")  //  //登录页面获取用户头像
    Call<user> userPhoto(
            @Query("user_user") String user_user
    );

    @GET("Train/trainlist/") //培训列表
    Call<List<Train>>trainlist(
            @Query("flag") int flag
    );
    @GET("Train/newslist/") //培训之消息列表
    Call<List<NewBean>>newslist(
            @Query("club_id") int club_id
    );
    @GET("Club/clublist/") //俱乐部列表
    Call<Club>clublist(
    );


    @GET("Club/clubCourse/") //俱乐部之教练列表
    Call<ClubCourse>clubCourse(
            @Query("club_id") int club_id
    );

    @GET("Club/clubCoach/") //俱乐部之课程
    Call<Coach>coachlist(
            @Query("club_id") int club_id
    );



    @GET("Train/addnew/") //培训之发送消息
    Call<NewBean>addnews(
            @Query("club_id") int club_id,
            @Query("send_id") int send_id,
            @Query("content") String content
    );

    @GET("Post/postlist/") //帖子列表
    Call<Post>postlist(
    );

    @GET("Post/postlist/") //用户帖子列表
    Call<Post>userpostlist(
            @Query("userid") int userid,
            @Query("flag") int flag,
            @Query("page") int page
    );


    @GET("Post/postDetail/") //帖子详情
    Call<PostDetail>postDetail(
            @Query("post_id") int post_id
    );
    @GET("Comment/thiscommentList/") //帖子评论
    Call<PostComment>thiscommentList(
            @Query("userid") int userid,
            @Query("postid") int postid,
            @Query("flag") int flag
    );



    @GET("Find/regOrLogin") //检测手机号是否存在 ,flag用户判断是注册还是找回密码
    Call<user>Register(
            @Query("flag") int flag,
            @Query("phone") String phone
    );

    @GET("Find/checkSMSCode/") //检验验证码是否在有效时间内，验证码是否正确
    Call<user>checkSMSCode(
            @Query("phone") String phone,
            @Query("verify") String verify
    );

    @GET("Find/resetPassword/") //重置密码
    Call<user>resetPassword(
            @Query("phone") String phone,
            @Query("verify") String verify,
            @Query("password") String password
    );

    @GET("Activity/activitylist/") //活动列表
    Call<Choiceness>activitylist(
    );
    @GET("Comment/commentList/") //系统消息列表
    Call<Comment>commentList(
            @Query("userid") int userid,
            @Query("flag") int flag,
            @Query("com_pid") int com_pid


    );
    @GET("UserInformation/bubbleNumber") //个人详情之旗袍数
    Call<BubbleNumber>bubbleNumber(
            @Query("suer_id") int suer_id
    );



    @GET("Comment/newsBubbleNumber/") //首页消息数
    Call<user>newsBubbleNumber(
            @Query("userid") int userid
    );

    @GET("Club/clubVideo/") //俱乐部视频
    Call<MediaStore.Video>clubVideo(
            @Query("club_id") int club_id
    );

    @GET("Club/videoComment") //俱乐部视频评论列表
    Call<VideoComment>videoComment(
            @Query("videoid") int videoid,
            @Query("clubid") int clubid
    );


    @GET("Club/addvideoComment/") //俱乐部视频评论添加
    Call<user>addvideoComment(
            @Query("userid") int userid,
            @Query("videoid") int videoid,
            @Query("clubid") int clubid,
            @Query("content") String content
    );

    @GET("Order/orderlist/") //其他订单
    Call<Order>orderlist(
            @Query("userid") int userid,
            @Query("status") int status
    );

    @GET("Order/trainOrderlist/") //培训订单
    Call<TrainOrder>trainOrderlist(
            @Query("userid") int userid
    );
    @GET("Order/activityOrderlist/") //活动订单
    Call<ActivityOrder>activityOrderlist(
            @Query("userid") int userid
    );
    @GET("Prize/prizelist/") //奖品
    Call<Prize>prizelist(
            @Query("suer_id") int suer_id
    );


    @GET("Race/racelist/") //最近比赛
    Call<Race>racelist(

    );
    @GET("Attention/attentionlist/") //关注
    Call<Attention>attentionlist(
            @Query("suer_id") int suer_id,
            @Query("flag") int flag
    );

    @GET("UserInformation/userInf/") //获取用户信息
    Call<UserInfo> userInf(
            @Query("suer_id") int suer_id
    );

    @GET("Post/addComment/") //添加评论
    Call<user>addComment(
            @Query("post_id") int post_id,
            @Query("userid") int userid,
            @Query("com_id") int com_id,
            @Query("content") String content
    );

    @GET("Post/addLoveNumber/") //点赞
    Call<user>addLoveNumber(
            @Query("userid") int userid,
            @Query("postid") int postid
    );

    @GET("Comment/delComment/") //删除消息
    Call<user>delComment(
            @Query("userid") int userid,
            @Query("flag") int flag,
            @Query("commentid") int commentid
    );

    @GET("Activity/activityApply") //活动报名
    Call<user> activityApply(
            @Query("user_id") int user_id,
            @Query("activity_id") int activity_id,
            @Query("activity_name") String  activity_name,
            @Query("activity_type") String  activity_type,
            @Query("activity_price") String  activity_price,
            @Query("user_phone") String  user_phone,
            @Query("user_name") String  user_name,
            @Query("paynum") String  paynum
    );


    @GET("Attention/addAttention") //添加关注
    Call<user> addAttention(
            @Query("suer_id") int suer_id,
            @Query("attentionid") int attentionid,   //如果flag为0，则attentionid为userid，否则，为master id
            @Query("name") String  name,
            @Query("pic") String  pic,
            @Query("flag") int  flag
    );


    @GET("Activity/trainApply") //培训报名
    Call<user> trainApply(
            @Query("userid") int userid,
            @Query("trainid") int trainid,
            @Query("name") String  name,
            @Query("price") String  price,
            @Query("phone") String  phone
    );



    @Multipart
    @POST("UserInformation/alteruser/") //个人详情修改
    Call<user> alteruser(
            @Query("uid") int userid,
            @Query("name") String name,
            @Query("address") String address,
            @Part MultipartBody.Part file
    );


//    @Multipart
//    @POST("Post/addpost/") //发帖子
//    Call<User>addpost(
//            @Query("uid") int userid,
//            @Query("content") String content,
//            @Part MultipartBody.Part file
//    );

    @Multipart
    @POST("Post/postadd/") //发晒图
    Call<user>postadd(
            @Query("uid") int userid,
            @Query("content") String content,
            @Part MultipartBody.Part file
    );

}
